import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/assets/global.css'
import 'element-ui/lib/theme-chalk/index.css';
import VueParticles from 'vue-particles'
import echarts from 'echarts'
/* import * as echarts from 'echarts' */
import 'echarts'
import 'core-js/features/array'
import request from './utils/request';
import axios from 'axios'
import config from './config/env'; // 引入配置文件
//读取外部配置文件
/* axios.get('/config.json').then((res) => {
  Vue.prototype.$config = res.data; // 将配置添加到 Vue 原型中
  new Vue({
    render: h => h(App),
  }).$mount('#app');
}).catch((error) => {
  console.error('Failed to load config.json', error);
}); */
Vue.config.productionTip = false;
Vue.prototype.$echarts = echarts;
Vue.prototype.$request = request;
// 将配置文件挂载到Vue实例上
Vue.prototype.$config = config;
Vue.use(VueParticles)
Vue.use(ElementUI,/*{size: "small"}*/);
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
